$(document).ready(function(){
	var imageList = $('#slideList > p');
	$('#slider').slider({
			slide:function(event, ui){
				var max = $('#slider').slider( "option", "max" ); //default: 100
				var min = $('#slider').slider( "option", "min" ); //default: 0
				var start = 0;
				var end = imageList.size() - 1;
				// start:min = end:max
				var imgIndex = parseInt((ui.value - min) * (end - start) / (max - min) + start);
							
				imageList.css('display', 'none');
				imageList.eq(imgIndex).css('display', 'block');
			}
	});
});